#include "glut_win.h"

void CGlutWindow::Init(int* pargc, char** pargv,
            unsigned int mode,
            int x, int y, int width, int height)
{
    glutInit(pargc, pargv);

    glutInitDisplayMode(mode);

    glutInitWindowPosition(x, y);
    glutInitWindowSize(width, height);
    glutCreateWindow(m_title.c_str());

    // 设置glut主循环线程退出后返回主函数
    glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_GLUTMAINLOOP_RETURNS);
}